package com.token.sysorg.services;
import com.token.sql.IntegrateSql;
import com.token.sysorg.bean.FSysDepartment;

import java.util.Vector;

import com.token.base.FuncUtil;
import com.token.base.JsonGenerator;
import com.token.base.Pl;
/**
 *
 * @author 代码创建
 */
public class FSysDepartmentRead{
	//Gson gson;
	public FSysDepartmentRead(){
		//gson = new Gson();
	}

	/**
	 *
	 * @param F
	 * @param iSql
	 * @throws Exception
	 */
	public void ReadData(FuncUtil F,IntegrateSql iSql) throws Exception {
		FSysDepartment dao = new FSysDepartment(iSql);
		Vector<String> keyValue = new Vector<String>();
		keyValue.add(F.getUrlQueryString(dao.getKeyName()));
		keyValue.add(Pl.getSysId()+"");
		dao.initParamToRs("DepartmentNumber=? and SysID=?", keyValue);
		F.putJsonData("data", JsonGenerator.toJson(dao));
		F.putJsonData(dao.getKeyName(), dao.getKeyId());
	}

}
